package code.phpnet
{
	import flash.net.Responder;
	public class UserRo extends PhpServer
	{
		private var tableexpiretime:int=10;//过期时间
		private var _cb:Function;//回调
		public function UserRo()
		{
			super();
		}
		
		/**
		 * uid  uid(1普通房间，2比赛房间....)
		 * 
		 */
		public function getUserInfo(cb:Function,uid:int):void 
		{
			_cb = cb;
			var param:Array = new Array();
			param[0] = uid;
			this.oConnect.call("user.login", new Responder(onGetGameZoneUserInfo, serverFault), this.genParam( param));
		}
		
		/**
		 *获取桌子列表 
		 * @param rets
		 * 
		 */
		private function onGetGameZoneUserInfo(rets:Object):void 
		{
			var ret:Object = this.getRet(rets);
			if ( rets['flag'] == 1&& rets['check']&&rets['error']) { //从服务端返回的数据,缓存起来
				_globalParam.CC.T[ret['ttype']] = ret['ret'];
				_globalParam.CC.TT[ret['ttype']] = (new Date()).valueOf();
				if(Boolean(_cb)) {
					_cb(ret)
				}
			}
		}
	}
}